#include "Card.h"

void Initialize(card &c)
{
	// Initialises all of the card attributes to 0;
	c.kind = 0;
	c.figure = 0;
	c.value = 0;
	// Creates a card template
	char emptyCard[CARD_HEIGHT_VISUAL][CARD_WIDTH_VISUAL];
	// Copies the card template
	memcpy(emptyCard, EMPTY_CARD_VISUAL,
		sizeof(char) * CARD_WIDTH_VISUAL * CARD_HEIGHT_VISUAL);
}

// Display and horizontal Display of the card
void Display(const card& c, int row, int width)
{
	char currentCard[CARD_HEIGHT_VISUAL][CARD_WIDTH_VISUAL];
	// Copies the 
	memcpy(currentCard, CARD_VISUAL,
		sizeof(char) *CARD_WIDTH_VISUAL * CARD_HEIGHT_VISUAL);

	// Insert signs on the cards
	currentCard[1][2] = c.figure;
	currentCard[4][3] = c.kind;
	currentCard[7][4] = c.figure;

	for (int j = 0; j < width; j++)
	{
		std::cout << currentCard[row][j];
	}
}
